package com.yjt.javatest.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yjt.javatest.entity.Answer;
import com.yjt.javatest.entity.vo.AnswerState;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author fengye
 * @Date: 2022-07-21-16:55
 * @Description:
 */
@Mapper
@Repository
public interface AnswerMapper extends BaseMapper<Answer> {
    @Select("select a.*, t.score_status from answer a join test t on a.test_id = t.test_id")
    List<AnswerState> getAnswersWithScoreStatus(Long userId);
}
